<template>
  <div>
    <h3>孙子组件</h3>
    <ul>
      <li @click="ct++">{{ ct }}</li>
      <li @click="obj.a++">{{ obj }}</li>
    </ul>
  </div>
</template>

<script>
import { inject } from 'vue'
export default {
  setup () {
    const ct = inject('count')
    const obj = inject('obj')

    return { ct, obj }
  }
}
</script>

<style lang="scss" scoped>
</style>
